﻿
/*----------------------------------------------------------------//
// 文件名：MoExcelsrvresult.cs
// 文件功能描述：实体 MoExcelsrvresult.
// 
// 创建标识：Template  ver 5.0.20090429 2009-11-25
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoExcelsrvresult
using System;
using System.Data;
namespace DocSrv.Model
{
    /// <summary>
    /// 业务实体MoExcelsrvresult
    /// </summary>
    public partial class MoExcelsrvresult : ICloneable
    {
        #region 表Excelsrvresult的字段
        private string fileId;
        private string markName;
        private string markValue;
        private DateTime createTime;
        private string description;
        private string reportId;
        private int tsrc;
        #endregion

        #region 构造函数
        public MoExcelsrvresult()
        {
            createTime = new DateTime(1900, 1, 1);

        }
        #endregion

        #region 拷贝构造函数

        public MoExcelsrvresult(MoExcelsrvresult item)
        {
            item.CopyTo(this);
        }
        #endregion

        #region 带参数构造函数
        public MoExcelsrvresult(string fileId, string markName, string markValue, DateTime createTime, string description, string reportId, int tsrc)
        {
            this.fileId = fileId;
            this.markName = markName;
            this.markValue = markValue;
            this.createTime = createTime;
            this.description = description;
            this.reportId = reportId;
            this.tsrc = tsrc;
        }
        #endregion

        #region 表Excelsrvresult的字段属性
        /// <summary>
        /// FILE_ID
        /// </summary>
        public string FileId
        {
            get { return fileId; }
            set { fileId = value; }
        }
        /// <summary>
        /// MARK_NAME
        /// </summary>
        public string MarkName
        {
            get { return markName; }
            set { markName = value; }
        }
        /// <summary>
        /// MARK_VALUE
        /// </summary>
        public string MarkValue
        {
            get { return markValue; }
            set { markValue = value; }
        }
        /// <summary>
        /// CREATE_TIME
        /// </summary>
        public DateTime CreateTime
        {
            get { return createTime; }
            set { createTime = value; }
        }
        /// <summary>
        /// DESCRIPTION
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        /// <summary>
        /// REPORT_ID
        /// </summary>
        public string ReportId
        {
            get { return reportId; }
            set { reportId = value; }
        }
        /// <summary>
        /// TSRC
        /// </summary>
        public int Tsrc
        {
            get { return tsrc; }
            set { tsrc = value; }
        }
        #endregion

        #region 辅助函数
        /// <summary>
        /// 拷贝函数
        /// </summary>
        public MoExcelsrvresult CopyTo(MoExcelsrvresult item)
        {
            item.fileId = this.fileId;
            item.markName = this.markName;
            item.markValue = this.markValue;
            item.createTime = this.createTime;
            item.description = this.description;
            item.reportId = this.reportId;
            item.tsrc = this.tsrc;
            return item;
        }
        /// <summary>
        /// 克隆函数
        /// </summary>		
        public object Clone()
        {
            MoExcelsrvresult mo = new MoExcelsrvresult();
            mo.FileId = this.FileId;
            mo.MarkName = this.MarkName;
            mo.MarkValue = this.MarkValue;
            mo.CreateTime = this.CreateTime;
            mo.Description = this.Description;
            mo.ReportId = this.ReportId;
            mo.Tsrc = this.Tsrc;
            return mo;
        }
        ///<summary>
        ///判断对象是否相等
        ///<summary>
        public override bool Equals(object obj)
        {
            if (object.ReferenceEquals(this, obj))
            {
                return true;
            }
            else
            {
                MoExcelsrvresult NewExcelsrvresult = obj as MoExcelsrvresult;
                if (NewExcelsrvresult == null)
                {
                    return false;
                }
                else
                {
                    if (NewExcelsrvresult.FileId == this.FileId && NewExcelsrvresult.MarkName == this.MarkName && NewExcelsrvresult.MarkValue == this.MarkValue && NewExcelsrvresult.CreateTime == this.CreateTime && NewExcelsrvresult.Description == this.Description && NewExcelsrvresult.ReportId == this.ReportId && NewExcelsrvresult.Tsrc == this.Tsrc)
                    {
                        return true;
                    }
                }

            }
            return false;

        }
        ///TODO:you should modify GetHashCode by yourself.
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override string ToString()
        {
            return String.Format(System.Globalization.CultureInfo.InvariantCulture, "FileId={0}/MarkName={1}/MarkValue={2}/CreateTime={3}/Description={4}/ReportId={5}/Tsrc={6}", fileId, markName, markValue, createTime, description, reportId, tsrc);

        }
        #endregion


        #region DataTable Help Function
        ///<summary>
        ///DataRow转换成Model
        ///</summary>
        public void Row2Model(DataRow row)
        {
            if (row["File_ID"] != null && row["File_ID"] != DBNull.Value)
            {
                this.FileId = (string)row["File_ID"];
            }
            else
            {
                this.FileId = string.Empty;
            }
            if (row["Mark_Name"] != null && row["Mark_Name"] != DBNull.Value)
            {
                this.MarkName = (string)row["Mark_Name"];
            }
            else
            {
                this.MarkName = string.Empty;
            }
            if (row["Mark_Value"] != null && row["Mark_Value"] != DBNull.Value)
            {
                this.MarkValue = (string)row["Mark_Value"];
            }
            else
            {
                this.MarkValue = string.Empty;
            }
            if (row["Create_Time"] != null && row["Create_Time"] != DBNull.Value)
            {
                this.CreateTime = (DateTime)row["Create_Time"];
            }
            else
            {
                this.CreateTime = DateTime.MinValue;
            }
            if (row["Description"] != null && row["Description"] != DBNull.Value)
            {
                this.Description = (string)row["Description"];
            }
            else
            {
                this.Description = string.Empty;
            }
            if (row["Report_ID"] != null && row["Report_ID"] != DBNull.Value)
            {
                this.ReportId = (string)row["Report_ID"];
            }
            else
            {
                this.ReportId = string.Empty;
            }
            if (row["TSRC"] != null && row["TSRC"] != DBNull.Value)
            {
                this.Tsrc = (int)row["TSRC"];
            }
            else
            {
                this.Tsrc = 0;
            }
        }

        ///<summary>
        ///Model转换成DataRow
        ///</summary>
        public void Model2Row(DataRow row)
        {
            row["File_ID"] = this.FileId;
            row["Mark_Name"] = this.MarkName;
            row["Mark_Value"] = this.MarkValue;
            row["Create_Time"] = this.CreateTime;
            row["Description"] = this.Description;
            row["Report_ID"] = this.ReportId;
            row["TSRC"] = this.Tsrc;
        }
        #endregion
    }
}
#endregion
